package com.waterfairy.http.response;

import java.util.ArrayList;

/**
 * @author water_fairy
 * @email 995637517@qq.com
 * @date 2018/4/27
 * @Description:
 */
public class BaseListBean<T> {


    /**
     * total : 8
     * size : 10
     * current : 1
     * searchCount : true
     * pages : 1
     */

    private int total;
    private int recordCount;

    private int size;
    private int pageSize;

    private int current;
    private int currentPage;

    private int pages;
    private int pageCount;

    private boolean searchCount;
    private ArrayList<T> records;

    public ArrayList<T> getRecords() {
        return records;
    }

    public void setRecords(ArrayList<T> records) {
        this.records = records;
    }

    public int getTotal() {
        return Math.max(total, recordCount);
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getSize() {
        return Math.max(size, pageSize);
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getCurrent() {
        return Math.max(current, currentPage);
    }

    public void setCurrent(int current) {
        this.current = current;
    }

    public boolean isSearchCount() {
        return searchCount;
    }

    public void setSearchCount(boolean searchCount) {
        this.searchCount = searchCount;
    }

    public int getPages() {
        return Math.max(pages, pageCount);
    }

    public void setPages(int pages) {
        this.pages = pages;
    }
}
